package com.project.bean;

import com.baomidou.mybatisplus.annotation.*;

@TableName("t_product")
public class ProductBean {
    @TableId(value = "pk_productId",type = IdType.AUTO)
    private Integer id;
    @TableField("p_name")
    private String name;
    @TableField("p_price")
    private Integer price;
    @Version //标识该属性对应版本列
    @TableField("p_version")
    private Integer version;

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "ProductBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                '}';
    }
}
